i2c: bcm2835: Can't support I2C_M_IGNORE_NAK
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 22 Sep 2016 20:05:50 +0000 (22:05 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Thu, 9 Mar 2017 17:51:58 +0000 (17:51 +0000)
commit7525bb801d67bffc6a527c491085813bcbc65ec4
tree7e32968fbfc688f26579e09276a5ed55eda33d2d
parent6a4db7770cb03ad8b5037b6fd316441daa110d20
i2c: bcm2835: Can't support I2C_M_IGNORE_NAK

The controller can't support this flag, so remove it.

Documentation/i2c/i2c-protocol states that all of the message is sent:

I2C_M_IGNORE_NAK:
    Normally message is interrupted immediately if there is [NA] from the
    client. Setting this flag treats any [NA] as [A], and all of
    message is sent.

From the BCM2835 ARM Peripherals datasheet:

    The ERR field is set when the slave fails to acknowledge either
    its address or a data byte written to it.

So when the controller doesn't receive an ack, it sets ERR and raises
an interrupt. In other words, the whole message is not sent.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
drivers/i2c/busses/i2c-bcm2835.c